home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / cross / sasmv14.dms / sasmv14.adf / examples / rep.s < prev    next >
Text File  |  1993-05-22  |  1KB  |  68 lines

  1.  
  2. ***************************************************
  3. **
  4. ** Little Repeat Test © 1993 by Florian W. Sauer
  5. ** ~~~~~~~~~~~~~~~~~~
  6. ** Just to show how .repeat works..
  7. **
  8. ** © 1993 by Infernal Byte Systems, INC.
  9. **
  10. ***************************************************
  11.  
  12.     heap    O=256k
  13.  
  14. repcount    set    0        ;count our repeats..
  15. repcount2    set    0
  16. reptimes    equ    2+1        ;some constants
  17. Null        equ    0
  18.  
  19.     .repeat reptimes {
  20.         dc.w    "?!"
  21.         .repeat (reptimes-1) {
  22.             dc.b    "-"
  23.             dc.w    "?!"
  24. repcount2        set    repcount2+1
  25.             exp=    repcount2
  26.             dc.b    "-"
  27.         }
  28. repcount    set    repcount+1
  29.         exp=    repcount
  30.     }
  31.  
  32.     .repeat    2^8 {
  33.         nop        ;256 times of NOP... how usefully...
  34.     }
  35.  
  36. ;or why not be cryptic?
  37. ;~~~~~~~~~~~~~~~~~~~~~~
  38. value    set    Null
  39.     .repeat    (2^(reptimes-1))-1 {
  40. value        set value+1
  41.         .repeat    (2^(reptimes+1))-1 {
  42. value            set value+1
  43.             .repeat    (2^(reptimes+1))-1 {
  44. value                set value+1
  45.                 .repeat    (2^(reptimes+1))-1 {
  46. value                    set value+1
  47.                     .repeat    (2^(reptimes+1))-1 {
  48. value                        set value+1
  49.                     }
  50.                 }
  51.                 rts
  52.             }
  53.             nop
  54.         }
  55.         .say !            ;just print a NEWLINE
  56.         if value>100000
  57.             .say We are near to finish this assembly...
  58.             .say Don't give up!!!
  59.         else ;blabla
  60.             .say PLEASE WAIT...
  61.         endc
  62.         .repeat 2 {
  63.             exp= value
  64.         }
  65.     }
  66.  
  67. ;end of this cool sourcecode...
  68.